get logged-in user in Spring Security

89

get logged-in user in Spring Security -

Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
// Get user name
authentication.getName()
Code language: JavaScript (javascript)

Comments

Submit
0 Comments